package com.guomw.report.service.repository;

import com.guomw.report.service.entity.DetectionIndex;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface DetectionIndexRepository extends JpaRepository<DetectionIndex, Integer>, JpaSpecificationExecutor<DetectionIndex> {
    @Query("select  r from DetectionIndex  r where r.reportId=?1 and r.code=?2")
    List<DetectionIndex> findByReportIdAndCode(long reportId, String code);
}
